-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add important asserts to the default save inventory #15197
Add important asserts to the default save inventory #15197
Conversation
Expose a fixed_foreign_keys list, givin us a way to assert referential integrity. This tool is vital for targeted refresh where we need to be sure, that the referential integrity will not be broken.
Extract distinct relation assertion to a base class
Extract referential integrity assertion to a base class
Use base class assert_distinct_relation
USe base class assert_referential_integrity
@miq-bot add_label enhancement |
Checked commits Ladas/manageiq@4c99c65~...bcab13b with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/manager_refresh/inventory_collection.rb
app/models/manager_refresh/save_collection/saver/base.rb
|
@agrare can we ignore the 'Use next to skip iteration' I want to do return there if the first breaks the assert. Rubocop got it wrong I think :-) And I am fixing the other in next PR |
Yeah agreed that looks fine to me |
Add important asserts to the default save inventory. First we just extract the distinct assert to a base class. Then we are adding an assert for a referential_integrity.